package com.netease.image.video;

import android.content.Context;
import android.content.res.AssetManager;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.BitmapFactory.Options;
import android.net.Uri;
import android.text.TextUtils;
import android.webkit.URLUtil;
import com.netease.image.c;
import com.netease.pris.app.PrisApp;
import java.io.FileDescriptor;
import java.io.IOException;
import java.io.InputStream;

public class ac
  implements a
{
  private static final int o = -1;
  Uri j;
  u k;
  int l = -1;
  int m = -1;
  CharSequence n;

  public ac(u paramu, Uri paramUri, String paramString)
  {
    this.j = paramUri;
    this.k = paramu;
    this.n = paramString;
  }

  static Bitmap a(Context paramContext, String paramString)
  {
    Bitmap localBitmap = null;
    if ((paramContext == null) || (TextUtils.isEmpty(paramString)));
    while (true)
    {
      return localBitmap;
      AssetManager localAssetManager = paramContext.getAssets();
      try
      {
        InputStream localInputStream = localAssetManager.open(paramString);
        localBitmap = BitmapFactory.decodeStream(localInputStream);
        if (localInputStream == null)
          continue;
        localInputStream.close();
      }
      catch (IOException localIOException)
      {
        localIOException.printStackTrace();
      }
    }
  }

  // ERROR //
  private void h()
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_1
    //   2: new 73	java/io/File
    //   5: dup
    //   6: aload_0
    //   7: getfield 28	com/netease/image/video/ac:j	Landroid/net/Uri;
    //   10: invokevirtual 79	android/net/Uri:getPath	()Ljava/lang/String;
    //   13: invokespecial 82	java/io/File:<init>	(Ljava/lang/String;)V
    //   16: ldc 83
    //   18: invokestatic 88	android/os/ParcelFileDescriptor:open	(Ljava/io/File;I)Landroid/os/ParcelFileDescriptor;
    //   21: astore 7
    //   23: aload 7
    //   25: astore_1
    //   26: new 90	android/graphics/BitmapFactory$Options
    //   29: dup
    //   30: invokespecial 91	android/graphics/BitmapFactory$Options:<init>	()V
    //   33: astore 8
    //   35: aload 8
    //   37: iconst_1
    //   38: putfield 95	android/graphics/BitmapFactory$Options:inJustDecodeBounds	Z
    //   41: aload_0
    //   42: aload_1
    //   43: invokevirtual 99	android/os/ParcelFileDescriptor:getFileDescriptor	()Ljava/io/FileDescriptor;
    //   46: aload 8
    //   48: invokevirtual 102	com/netease/image/video/ac:a	(Ljava/io/FileDescriptor;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
    //   51: pop
    //   52: aload_0
    //   53: aload 8
    //   55: getfield 105	android/graphics/BitmapFactory$Options:outWidth	I
    //   58: putfield 24	com/netease/image/video/ac:l	I
    //   61: aload_0
    //   62: aload 8
    //   64: getfield 108	android/graphics/BitmapFactory$Options:outHeight	I
    //   67: putfield 26	com/netease/image/video/ac:m	I
    //   70: aload_1
    //   71: invokestatic 113	com/netease/image/video/al:a	(Landroid/os/ParcelFileDescriptor;)V
    //   74: return
    //   75: astore 5
    //   77: aload_0
    //   78: iconst_0
    //   79: putfield 24	com/netease/image/video/ac:l	I
    //   82: aload_0
    //   83: iconst_0
    //   84: putfield 26	com/netease/image/video/ac:m	I
    //   87: aload_1
    //   88: invokestatic 113	com/netease/image/video/al:a	(Landroid/os/ParcelFileDescriptor;)V
    //   91: goto -17 -> 74
    //   94: astore_2
    //   95: aconst_null
    //   96: astore_3
    //   97: aload_2
    //   98: astore 4
    //   100: aload_3
    //   101: invokestatic 113	com/netease/image/video/al:a	(Landroid/os/ParcelFileDescriptor;)V
    //   104: aload 4
    //   106: athrow
    //   107: astore 6
    //   109: aload_1
    //   110: astore_3
    //   111: aload 6
    //   113: astore 4
    //   115: goto -15 -> 100
    //
    // Exception table:
    //   from	to	target	type
    //   2	23	75	java/io/FileNotFoundException
    //   26	70	75	java/io/FileNotFoundException
    //   2	23	94	finally
    //   26	70	107	finally
    //   77	87	107	finally
  }

  public Bitmap a(int paramInt1, int paramInt2)
  {
    return c.c(f(), paramInt1, paramInt2);
  }

  public Bitmap a(FileDescriptor paramFileDescriptor, BitmapFactory.Options paramOptions)
  {
    Bitmap localBitmap = null;
    if (paramOptions.mCancel);
    while (true)
    {
      return localBitmap;
      localBitmap = BitmapFactory.decodeFileDescriptor(paramFileDescriptor, null, paramOptions);
    }
  }

  public u a()
  {
    return this.k;
  }

  public Uri b()
  {
    return this.j;
  }

  public String c()
  {
    return this.j.getPath();
  }

  public int d()
  {
    if (this.l == -1)
      h();
    return this.l;
  }

  public int e()
  {
    if (this.m == -1)
      h();
    return this.m;
  }

  public boolean equals(Object paramObject)
  {
    if ((paramObject == null) || (!(paramObject instanceof ac)));
    for (boolean bool = false; ; bool = this.j.equals(((ac)paramObject).j))
      return bool;
  }

  public Bitmap f()
  {
    String str;
    if (URLUtil.isAssetUrl(this.j.toString()))
      str = this.j.toString().substring("file:///android_asset/".length());
    for (Bitmap localBitmap = a(PrisApp.a(), str); ; localBitmap = BitmapFactory.decodeFile(this.j.getPath()))
      return localBitmap;
  }

  public CharSequence g()
  {
    return this.n;
  }

  public int hashCode()
  {
    return this.j.hashCode();
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.image.video.ac
 * JD-Core Version:    0.6.0
 */